package com.xd.core.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xd.core.system.entity.SysPermission;
import com.xd.core.system.vo.UserAndPersVo;

import java.util.List;

/**
 * <p>
 * 菜单表 Mapper 接口
 * </p>
 *
 * @author SJ
 * @since 2023-03-15
 */
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    List<SysPermission> selectSysperms(Integer userId, Integer permissionId);

    List<SysPermission> getOpenList(List<Integer> ids);

    List<SysPermission> selectPersByRole(Integer roleId);

    List<String> getPersByRoleId(Integer id);

    List<UserAndPersVo> selectUserAndPers(List<Integer> companyIds);

    List<UserAndPersVo> selectUserAndPersByRoleId(Integer roleId);
}
